
//注册处理函数
const db = require("../db/index.js")
exports.regUser = (req,res) =>{
  const userinfo = req.body
  if(!userinfo.username || !userinfo.password){
    return res.send({
      status: 1,
      message:'用户名或密码不合法！'
    })
  }
  const sql = 'select * from ev_user where username = ?'

  db.query(sql,[userinfo.username], function(err,results){
    if(err){
      return res.send({
        status:1,
        message:err
      })
    }
  })

  res.send('reguser Ok')
}

//登录处理函数
exports.login  = (req,res) =>{
  res.send('login Ok')
}